#include"ui.h"
#include"lottery_sys.h"
void ctrl_admin(Lottery_t* lott_head,Buyer_t* user_head)
{
	char chose=0;
	while(1)
	{   
		system("clear");
		admin_center_ui();
		printf("情输入你的选择：");
		scanf("%c",&chose);
		cleaninput();
		switch(chose)
		{   
			case '1':
				add_lott_list(lott_head);
				sleep(3);
				break;
			case '2':
				admin_deal_ctrl(user_head);
				break;
			case '3':
				printf("查看彩票信息\n");
				show_lott_list(lott_head);
				printf("请按回车键返回\n"); 
			   	cleaninput();
				break;
			default:
				printf("back\n");
				save_lott_list(lott_head);
				free_lott_list(lott_head);
				return;
		}   
	}   
}
